#include <catch2/catch.hpp>

#include "solution.hpp"

TEST_CASE("041_first_missing_positive", "[041]") {
    std::vector< std::pair< std::vector<int>, int > > params {
        { {1,2,0},           3},
        { {3,4,-1,1},        2},
        { {7,8,9,11,12},     1},
        { {-1,-2},           1},
        { {4,3,4,1,1,4,1,4}, 2},
        { {0,2,2,1,1},       3} };

    for (auto& [lhs, rhs] : params) {
        CAPTURE(lhs);
        CHECK(Solution().firstMissingPositive(lhs) == rhs);
    }
}
